package com.cos.openapi.services;

import com.cos.openapi.entity.Menu;
import com.cos.openapi.entity.Role;
import com.cos.openapi.pojo.JsonResult;
import com.cos.openapi.pojo.TableResult;

import java.util.List;

public interface RoleServices {
    int deleteByPrimaryKey(Integer id);


    int insertSelective(Role record);

    Role selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Role record);
    /**
     *
     * @author: COS
     * @return:
     * @time: 2021/2/1 15:15
     * @description: 查询所有的权限信息
     */
    List<Role> getRoles();

    TableResult table(Integer page, Integer limit, String name);

    JsonResult updateStatus(Integer id, Integer status);

    List<Integer> roleMenu(Integer roleId);


    JsonResult assignMenu(Integer roleId, Integer[] menuIds);

    JsonResult updateRole(Role role);
}